package com.hxzy.boot.old.responsecontroller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wzm
 * @create 2023-09-25 9:29
 * project_name:javaweb2308
 */
@Controller //处理器
public class RespController02 {

    @ResponseBody //设置响应体数据  通常返回的就是JSON数据
    @RequestMapping("/hello02")
    public String hello(){
        return "你好";//响应JSON字符串

    }


    //访问页面
    @RequestMapping("/hello03")
    public String hello001(){
        return "a.html";

    }
}
